--- ../../swvox/swvox/csrc/swvox.cpp	2024-02-14 05:16:57.541407536 -0500
+++ ../google/swvox/swvox/csrc/swvox.cpp	2024-02-13 10:46:24.584645005 -0500
@@ -25,7 +25,7 @@
  */
 
 // This file contains only forward declarations and Python bindings
-
+ 
 #include <torch/extension.h>
 #include <cstdint>
 #include <vector>
@@ -36,8 +36,8 @@
 using torch::Tensor;
 
 std::vector<torch::Tensor> grid_weight_render(torch::Tensor data,
-                                              CameraSpec& cam,
-                                              RenderOptions& opt,
+                                              CameraSpecSwvox& cam,
+                                              RenderOptionsSwvox& opt,
                                               torch::Tensor offset,
                                               torch::Tensor scaling);
 
@@ -45,27 +45,23 @@
 Tensor query_vertical_backward(TreeSpec&, Tensor, Tensor);
 void assign_vertical(TreeSpec&, Tensor, Tensor);
 
-Tensor volume_render(TreeSpec&, RaysSpec&, RenderOptions&);
-Tensor volume_render_image(TreeSpec&, CameraSpec&, RenderOptions&);
-Tensor volume_render_backward(TreeSpec&, RaysSpec&, RenderOptions&, Tensor);
-Tensor volume_render_image_backward(TreeSpec&, CameraSpec&, RenderOptions&,
-                                    Tensor);
-
-std::tuple<Tensor, Tensor, Tensor> se_grad(TreeSpec&, RaysSpec&, Tensor,
-                                           RenderOptions&);
-std::tuple<Tensor, Tensor, Tensor> se_grad_persp(TreeSpec&, CameraSpec&,
-                                                 RenderOptions&, Tensor);
+QueryResult query_vertical_path(TreeSpec&, Tensor);
+Tensor query_vertical_path_backward(TreeSpec&, Tensor, Tensor);
+
+Tensor volume_render(TreeSpec&, RaysSpecSwvox&, RenderOptionsSwvox&);
+Tensor volume_render_backward(TreeSpec&, RaysSpecSwvox&, RenderOptionsSwvox&, Tensor);
 
 Tensor calc_corners(TreeSpec&, Tensor);
 
 std::tuple<Tensor, Tensor> quantize_median_cut(Tensor data, Tensor, int32_t);
 
 PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
-    py::class_<RaysSpec>(m, "RaysSpec")
+    py::class_<RaysSpecSwvox>(m, "RaysSpecSwvox")
         .def(py::init<>())
-        .def_readwrite("origins", &RaysSpec::origins)
-        .def_readwrite("dirs", &RaysSpec::dirs)
-        .def_readwrite("vdirs", &RaysSpec::vdirs);
+        .def_readwrite("origins", &RaysSpecSwvox::origins)
+        .def_readwrite("dirs", &RaysSpecSwvox::dirs)
+        .def_readwrite("vdirs", &RaysSpecSwvox::vdirs)
+        .def_readwrite("random_offset", &RaysSpecSwvox::random_offset);
 
     py::class_<TreeSpec>(m, "TreeSpec")
         .def(py::init<>())
@@ -75,48 +71,61 @@
         .def_readwrite("extra_data", &TreeSpec::extra_data)
         .def_readwrite("offset", &TreeSpec::offset)
         .def_readwrite("scaling", &TreeSpec::scaling)
+        .def_readwrite("max_depth", &TreeSpec::max_depth)
         .def_readwrite("_weight_accum", &TreeSpec::_weight_accum)
         .def_readwrite("_weight_accum_max", &TreeSpec::_weight_accum_max);
 
-    py::class_<CameraSpec>(m, "CameraSpec")
+    py::class_<CameraSpecSwvox>(m, "CameraSpecSwvox")
         .def(py::init<>())
-        .def_readwrite("c2w", &CameraSpec::c2w)
-        .def_readwrite("fx", &CameraSpec::fx)
-        .def_readwrite("fy", &CameraSpec::fy)
-        .def_readwrite("width", &CameraSpec::width)
-        .def_readwrite("height", &CameraSpec::height);
+        .def_readwrite("c2w", &CameraSpecSwvox::c2w)
+        .def_readwrite("fx", &CameraSpecSwvox::fx)
+        .def_readwrite("fy", &CameraSpecSwvox::fy)
+        .def_readwrite("width", &CameraSpecSwvox::width)
+        .def_readwrite("height", &CameraSpecSwvox::height);
 
-    py::class_<RenderOptions>(m, "RenderOptions")
+    py::class_<RenderOptionsSwvox>(m, "RenderOptionsSwvox")
         .def(py::init<>())
-        .def_readwrite("step_size", &RenderOptions::step_size)
+        .def_readwrite("step_size", &RenderOptionsSwvox::step_size)
         .def_readwrite("background_brightness",
-                       &RenderOptions::background_brightness)
-        .def_readwrite("ndc_width", &RenderOptions::ndc_width)
-        .def_readwrite("ndc_height", &RenderOptions::ndc_height)
-        .def_readwrite("ndc_focal", &RenderOptions::ndc_focal)
-        .def_readwrite("format", &RenderOptions::format)
-        .def_readwrite("basis_dim", &RenderOptions::basis_dim)
-        .def_readwrite("min_comp", &RenderOptions::min_comp)
-        .def_readwrite("max_comp", &RenderOptions::max_comp)
-        .def_readwrite("sigma_thresh", &RenderOptions::sigma_thresh)
-        .def_readwrite("stop_thresh", &RenderOptions::stop_thresh)
-        .def_readwrite("density_softplus", &RenderOptions::density_softplus)
-        .def_readwrite("rgb_padding", &RenderOptions::rgb_padding);
+                       &RenderOptionsSwvox::background_brightness)
+        .def_readwrite("ndc_width", &RenderOptionsSwvox::ndc_width)
+        .def_readwrite("ndc_height", &RenderOptionsSwvox::ndc_height)
+        .def_readwrite("ndc_focal", &RenderOptionsSwvox::ndc_focal)
+        .def_readwrite("format", &RenderOptionsSwvox::format)
+        .def_readwrite("basis_dim", &RenderOptionsSwvox::basis_dim)
+        .def_readwrite("min_comp", &RenderOptionsSwvox::min_comp)
+        .def_readwrite("max_comp", &RenderOptionsSwvox::max_comp)
+        .def_readwrite("sigma_thresh", &RenderOptionsSwvox::sigma_thresh)
+        .def_readwrite("stop_thresh", &RenderOptionsSwvox::stop_thresh)
+        .def_readwrite("density_softplus", &RenderOptionsSwvox::density_softplus)
+        .def_readwrite("rgb_padding", &RenderOptionsSwvox::rgb_padding)
+        .def_readwrite("accumulate", &RenderOptionsSwvox::accumulate)
+        .def_readwrite("accumulate_sigma", &RenderOptionsSwvox::accumulate_sigma)
+        .def_readwrite("piecewise_linear", &RenderOptionsSwvox::piecewise_linear)
+
+        .def_readwrite("wavelet_type", &RenderOptionsSwvox::wavelet_type)
+        .def_readwrite("lowpass_depth", &RenderOptionsSwvox::lowpass_depth)
+        .def_readwrite("eval_wavelet_integral", &RenderOptionsSwvox::eval_wavelet_integral)
+        .def_readwrite("linear_color", &RenderOptionsSwvox::linear_color)
+        .def_readwrite("wavelet_sigma", &RenderOptionsSwvox::wavelet_sigma)
+
+        .def_readwrite("render_distance", &RenderOptionsSwvox::render_distance)
+        .def_readwrite("sigma_penalty", &RenderOptionsSwvox::sigma_penalty)
+        .def_readwrite("backward_absolute_values", &RenderOptionsSwvox::backward_absolute_values)
+        ;
 
     m.def("query_vertical", &query_vertical);
     m.def("query_vertical_backward", &query_vertical_backward);
+    
     m.def("assign_vertical", &assign_vertical);
 
+    m.def("query_vertical_path", &query_vertical_path);
+    m.def("query_vertical_path_backward", &query_vertical_path_backward);
+    
     m.def("volume_render", &volume_render);
-    m.def("volume_render_image", &volume_render_image);
     m.def("volume_render_backward", &volume_render_backward);
-    m.def("volume_render_image_backward", &volume_render_image_backward);
-
-    m.def("se_grad", &se_grad);
-    m.def("se_grad_persp", &se_grad_persp);
-
+    
     m.def("calc_corners", &calc_corners);
 
-    m.def("grid_weight_render", &grid_weight_render);
     m.def("quantize_median_cut", &quantize_median_cut);
 }
